package main

import (
    //"fmt"
	"thirdpaysdk/api/hnapay"
	"github.com/astaxie/beego"
	//"io/ioutil"
)

func refund() {
   
	merCode := "10000000466"
	secreCode := "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCUv/SoV28tynQoWxqiyKfcmGaeijI7ZRDMg/P2xC2kDK3t/3NDzT43RDtHtvxRHXB5I7im6F3bFCK40dW6vEixDwB8pNN5OKCrtf3fMqzK7dvo8E+PQNEgoGQrdniY/ai8kriG1zVl/8hNukXKWHFj785kI/znAp9FFW/yb8EtZwIDAQAB"
	refundId := "38952092979276"
	orderId := "389520929796329472"
	
	amount := 1
	currency := "CNY"
	noticeUrl := "https://api.dhfapp.com" + "/public/hnapay/notify"
	rsp, err := hnapay.Refunds(merCode,refundId,orderId,amount,currency,noticeUrl,secreCode)
	if err != nil {
	   beego.Debug("Refunds error:", err.Error())
	   return
	}
	beego.Debug("Refunds Status:", string(rsp.Content.MerOrderId))
}

